<template>
  <el-table :data="list" style="width: 100%;padding-top: 15px;">
    <el-table-column label="Order_ID" min-width="200">
      <template slot-scope="scope">
     {{ scope.row[1].orderId}}  
      </template>
    </el-table-column>
    <el-table-column label="createTime" min-width="200">
      <template slot-scope="scope">
     {{ scope.row[1].createTime}}   
      </template>
    </el-table-column>
    <el-table-column label="Price" width="195" align="center">
      <template slot-scope="scope">
        ¥  {{ scope.row[1].payment }}
      </template>
    </el-table-column>
    <el-table-column label="Status" width="100" align="center">
      <template slot-scope="scope">
        <el-tag >
           {{ scope.row[1].orderStatus==0?'待支付':'已支付' }}
        </el-tag>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
import { transactionList } from '@/api/remote-search'
import { selectAllOrder } from '@/api/user'

export default {
  filters: {
    statusFilter(status) {
      const statusMap = {
        success: 'success',
        pending: 'danger'
      }
      return statusMap[status]
    },
    orderNoFilter(str) {
      return str.substring(0, 30)
    }
  },
  data() {
    return {
      list: null
    }
  },
  created() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      selectAllOrder({
        page:1,
        pageSize:6,
        type:1
      }).then(response => {
        console.log(response)
        this.list = response.data.data.orderDetail
        console.log(this.list)
      })
    }
  }
}
</script>
